﻿@using AP.Framework.Infrastructure.Repositories
@using AP.Framework.Infrastructure.Database
@{
    ApContext context = new ApContext();
    ChannelRepository channelRep = new ChannelRepository(context);
    var channelList = channelRep.GetAll().Where(p => p.ParentID == 0 && p.IsDisable == false).OrderBy(p => p.Sequence).ToList();
}
@helper ActiveClass(string controllerName)
    {
        var currentController = ViewContext.RouteData.Values["Controller"];
        if (controllerName == currentController.ToString())
        {
    @:class='current'
    }
}
<div id="primary-menu">
    <ul>
        <li @ActiveClass("Home")><a href="@Url.Action("Index", "Home", new { area = "" })">
            <div>
                网站首页</div>
            <span>Go Index</span> </a></li>
        <li @ActiveClass("Company")><a href="@Url.Action("Index", "Company", new { area = "" })">
            <div>
                公司简介</div>
            <span>Company Info</span></a> </li>
        <li @ActiveClass("News")><a href="@Url.Action("Index", "News", new { area = "" })">
            <div>
                新闻动态</div>
            <span>News Release</span></a> </li>
        <li @ActiveClass("Product")><a href="@Url.Action("Index", "Product", new { area = "" })">
            <div>
                产品展示</div>
            <span>Product Display</span></a> </li>
        <li @ActiveClass("Job")><a href="@Url.Action("Index", "Job", new { area = "" })">
            <div>
                人才招聘</div>
            <span>Jobs</span></a> </li>
        <li @ActiveClass("Contact")><a href="@Url.Action("Index", "Contact", new { area = "" })">
            <div>
                联系我们</div>
            <span>Contact Us</span></a></li>
        <li @ActiveClass("Links")><a href="@Url.Action("Index", "Links", new { area = "" })">
            <div>
                友情链接</div>
            <span>Other Links</span></a></li>
    </ul>
</div>
